<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>借钱用</title>
  <script src="js/vendor/flexible.js"></script>
  <script src="js/vendor/flexible_css.js"></script>
  <link rel="stylesheet" href="css/me.css">
</head>
<body>
  <div class="container">
    <!--头部-->
    <div class="header">
      <a class="go-back" href="javascript:history.go(-1)"></a>
      设置
    </div>
    <!---->
    <div class="entry pl35 mt110 bcWhite">
      <a href="setPwd.html">
        设置密码
        <i></i>
      </a>
    </div>
    <div class="entry pl35 cutline mt15 bcWhite">
      <a href="aboutUs.html">
        关于我们
        <i></i>
      </a>
    </div>
    <div class="entry pl35 cutline bcWhite">
      <a href="proIntro.html">
        产品介绍
        <i></i>
      </a>
    </div>
    <div class="entry pl35 bcWhite">
      <a href="cooper.html">
        商务合作
        <i></i>
      </a>
    </div>
    <!--退出登录-->
    <a class="sign-out" href="javascript:;">
      退出登录
    </a>
    <div class="sign-out-popup-wrap">
      <div class="sign-out-popup">
        <div class="title">确认退出登录？</div>
        <a id="signOutBtn" href="javascript:;">退出</a>
        <a id="cancelBtn" href="javascript:;">取消</a>
      </div>
    </div>

  </div>
  <script src="js/vendor/zepto.min.js"></script>
  <script src="js/util.js"></script>
  <script>
    (function () {
      util.setPageHeight();
      var setPwd  = document.querySelectorAll('.entry')[0].querySelector('a');
      var signOut = document.querySelector('.sign-out');
      var popupWrap  = document.querySelector('.sign-out-popup-wrap');
      var signOutBtn = document.querySelector('#signOutBtn');
      var cancelBtn  = document.querySelector('#cancelBtn');

      setPwd.addEventListener('click', function (e) {
        e.preventDefault();
        if (!localStorage.jqyPhone) {
          location.href = './signIn.html?to=setPwd';
        } else {
          location.href = e.currentTarget.getAttribute('href');
        }
      });

      signOut.addEventListener('click', function () {
        popupWrap.classList.add('show');
      });
      popupWrap.addEventListener('click', function (e) {
        e.target.classList.remove('show');
      });
      signOutBtn.addEventListener('click', function () {
        popupWrap.classList.remove('show');
        localStorage.removeItem('jqyToken');
        localStorage.removeItem('jqyCookie');
        localStorage.removeItem('jqyUserId');
        localStorage.removeItem('jqyPhone');
        localStorage.removeItem('jqyChannel');

        location.href = './setting.html';
      });
      cancelBtn.addEventListener('click', function () {
        popupWrap.classList.remove('show');
      });

      if (!localStorage.jqyPhone) {
        signOut.style.pointerEvents = 'none';
        signOut.style.backgroundColor = '#ccc';
      }
    }());
  </script>
  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?345217f8e4d40abf5324a3722f472b45";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>
</body>
</html>